#ifndef DEBUG_DRAWER_H
#define DEBUG_DRAWER_H

#include "btBulletDynamicsCommon.h"
#include <vector>
using namespace std;

class DebugDrawer : public btIDebugDraw
{
public:
	struct Color {
		float r, g, b;
	};
	struct Line {
		float ax, ay, az;
		float bx, by, bz;
	};

	DebugDrawer();
	~DebugDrawer();

	void drawLine (const btVector3 &from, const btVector3 &to, const btVector3 &color);
	void drawContactPoint (const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color);
	void reportErrorWarning (const char *warningString);
	void draw3dText (const btVector3 &location, const char *textString);
	void setDebugMode (int debugMode);
	int	getDebugMode () const;

	void drawAll();
	void clear();

private:
	int m_debugMode;
	vector<Line*> lines;
	vector<Color*> colors;
};

#endif